import { addBugWithRepeatCheck } from "./getReportBugs";

export const onFormSubmit = (form: HTMLFormElement, isFinish: boolean, id?: string, title?: string) => {
  if (form) {
    if (isFinish) {
      addBugWithRepeatCheck({
        id: id as string,
        name: title as string,
        url: window.location.href,
      });
    }

    form.submit();
  }
}